home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
- <xsl:output method="html"/>
-
- <xsl:variable name="common-styles">
- <style type="text/css">
- body { background-color: white; color: black; font: 80% Tahoma, Verdana, Arial, sans-serif; margin: 2px 28px; }
- a { color: #0002CA; text-decoration: none }
- a:hover { color: #6B8ADE; text-decoration: underline; }
- span.nodescription { color: silver; font-size: smaller; }
-
- /* override headings used by feeds */
- h1,h2,h3,h4,h5,h6 { font-size: 80%; font-weight: bold; font-style: italic; }
-
- div.newspapertitle { font-weight: bold; font-size: 120%; text-align: center; text-transform: uppercase; margin: 24px 0}
-
- div.channeltitle { font-weight: bold; text-transform: uppercase; margin-top: 12px; }
- div.channeltitle a { text-decoration: underline; }
-
- div.newsitemcontent ol, div.newsitemcontent ul { list-style-position: inside;}
- div.newsitemtitle { margin-bottom: 3px }
- div.newsitemfooter { color: gray; font-size: xx-small; text-align: right; font-style: italic; margin-top: 6px; margin-bottom: 18px; }
- div.newsitemcontent { line-height: 150%; }
- </style>
- </xsl:variable>
-
- <!-- channel group newspaper -->
- <xsl:template match="newspaper[@type='group']">
- <html>
- <head>
- <title>Group Newspaper</title>
- <xsl:copy-of select="$common-styles"/>
- </head>
- <body>
- <div class="newspapertitle"><xsl:value-of select="title" disable-output-escaping="yes"/></div>
-
- <!-- loop through each channel -->
- <xsl:for-each select="channel">
- <xsl:variable name="chanlink" select="link"/>
- <xsl:variable name="chantitle" select="title"/>
-
- <!-- channel -->
- <div class="channeltitle">
- <a href="{$chanlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
- </div>
-
- <!-- loop through each news item -->
- <ol>
- <xsl:for-each select="item">
- <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
- <div class="newsitemtitle">
- <xsl:variable name="itemlink" select="link"/>
- <li><a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a></li>
- </div>
- </xsl:for-each>
- </ol>
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
-
- <!-- channel newspaper -->
- <xsl:template match="newspaper[@type='channel']">
- <html>
- <head>
- <title>Channel Newspaper</title>
- <xsl:copy-of select="$common-styles"/>
- </head>
- <body>
- <div class="newspapertitle"><xsl:value-of select="title" disable-output-escaping="yes"/></div>
-
- <!-- loop through each news item -->
- <ol>
- <xsl:for-each select="channel/item">
- <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
- <div class="newsitemtitle">
- <xsl:variable name="itemlink" select="link"/>
- <li><a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a></li>
- </div>
- </xsl:for-each>
- </ol>
- </body>
- </html>
- </xsl:template>
-
- <!-- single news item -->
- <xsl:template match="newspaper[@type='newsitem']">
- <html>
- <head>
- <title>News Item</title>
- <xsl:copy-of select="$common-styles"/>
- <style>
- div.newspapertitle { text-transform: none; text-align: left; margin: 14px 0; font-size: 100%}
- div.newspapertitle a { text-decoration: underline; }
- </style>
- </head>
- <body>
- <xsl:for-each select="channel/item">
- <div class="newspapertitle">
- <xsl:variable name="itemlink" select="link"/>
- <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
- </div>
- <div class="newsitemcontent">
- <xsl:value-of select="description" disable-output-escaping="yes"/>
- </div>
- <div class="newsitemfooter">
- <!--
- Important: use 'source' element here so that source channel shows for
- newsbins and watches. For other channels, FeedDemon sets the source
- to the channel itself.
- -->
- <xsl:variable name="srclink" select="source/@htmlUrl"/>
- <a href="{$srclink}"><xsl:value-of select="source"/></a>
- <!-- add link to comments if available -->
- <xsl:if test="comments">
- <xsl:variable name="commentlink" select="comments"/>
- <xsl:variable name="commentimg" select="'$IMAGEDIR$comments.gif'"/>
- <a href="{$commentlink}"><img src="{$commentimg}" border="0" hspace="6"/></a>
- </xsl:if>
- <!-- add link to enclosure if available -->
- <xsl:if test="enclosure">
- <xsl:variable name="enclosurelink" select="enclosure/@url"/>
- <xsl:variable name="enclosureimg" select="'$IMAGEDIR$enclosure.gif'"/>
- <a href="{$enclosurelink}"><img src="{$enclosureimg}" border="0" hspace="6"/></a>
- </xsl:if>
- <br />
- <xsl:value-of select="fd:dateDisplay"/>
- </div>
- </xsl:for-each>
-
- </body>
- </html>
- </xsl:template>
-
- </xsl:stylesheet>